package engine.newUi
{
	import engine.scene.player.MoveAction;
	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	
	import newx.com.loader.SwfLoader;
	
	public class HouseSwfLoad extends Sprite
	{
		private var _house:MovieClip;
		private var _houseLevel:int	=	1;
		public function HouseSwfLoad()
		{
			super();
			Init();
		}
		public function set Level(val:int):void
		{
			_houseLevel	=	val;
			if(_house != null)
			{
				upDataLevel()
			}
			
		}
		private function  Init():void
		{
			SwfLoader.StartLoad("res/swf/houseEf.swf",null,addHouseSwfHandle);
		}
		
		private function addHouseSwfHandle(mc:MovieClip,pL:Array):void
		{
			_house	=	mc;
			this.addChild(_house);
			upDataLevel();
			
		}
		private function upDataLevel():void
		{
			(_house.getChildByName("house") as MovieClip).gotoAndStop(_houseLevel)
		}
		
	}
}